package graph;

import java.util.LinkedList;

import retrievedatafromrevishapi.AccessBooksData;
import bookworm.Review;

/**
 * this class will create the graph based on the text files with book reviews.
 * Each text file will contain lots of reviews from lots of books from a specific tag
 * that's referred on the name of the text file
 * @author Mina
 *
 */
public class BookReviewGraphConstructorFromTextFile extends AbstractBookReviewGraphConstructor
{
	public LinkedList<Review> getBookReviewsFromOneTag(String tag)
	{
		LinkedList<String> searchArguments = new LinkedList<String>();
		searchArguments.add("tag");
		LinkedList<String> argumentsValues = new LinkedList<String>();
		argumentsValues.add(tag);
		
		AccessBooksData accessBooksData = AccessBooksData.getAccessBooksData();
		LinkedList<Review> allBookReviewsFromOneTag =
				accessBooksData.getAllBookReviewsFromTextFile(searchArguments, argumentsValues);
		return allBookReviewsFromOneTag;
	}
}
